﻿<html dir="LTR"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><title>LockGuard Constructor (Object, TimeSpan)</title><xml></xml><link rel="stylesheet" type="text/css" href="MSDN.css"></head><body id="bodyID" class="dtBODY"><div id="nsbanner"><div id="bannerrow1"><table class="bannerparthead" cellspacing="0"><tr id="hdr"><td class="runninghead">An NDoc Documented Class Library</td><td class="product"></td></tr></table></div><div id="TitleRow"><h1 class="dtH1">LockGuard Constructor (Object, TimeSpan)</h1></div></div><div id="nstext"><p>
            Attempts to acquire an exclusive lock on the specified object.
            </p><div class="syntax">public LockGuard(<br>   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">object</a> <i>obj</i>,<br>   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTimeSpanClassTopic.htm">TimeSpan</a> <i>timeout</i><br>);</div><h4 class="dtH4">Parameters</h4><dl><dt><i>obj</i></dt><dd>The object on which to acquire the lock.</dd><dt><i>timeout</i></dt><dd>A <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTimeSpanClassTopic.htm">TimeSpan</a> representing the amount of time to wait for the lock. </dd></dl><h4 class="dtH4">See Also</h4><p><a href="ELS.Configuration.LockGuard.html">LockGuard Class</a> | <a href="ELS.Configuration.html">ELS.Configuration Namespace</a> | <a href="ELS.Configuration.LockGuardConstructor.html">LockGuard Constructor Overload List</a></p></div></body></html>